package com.espirit.builder.biz;

import org.springframework.stereotype.Component;

import com.espirit.eap.manager.ModelBuilderSupport;
import com.espirit.finance.core.AcctTerm;

@Component
public class AcctTermBuilder extends ModelBuilderSupport {
	protected static final String NAME = "name";
	protected static final String BEGIN = "beginDate";
	protected static final String END = "endDate";
	
	@Override
	public boolean init() {
		return super.setClass(AcctTerm.class, "Acct Term", "期间");
	}

	@Override
	public void buildFields() {
		super.buildFields();
		addModelField(NAME, "Month", "月份");
		addModelField(BEGIN, "Begin Date", "开始日");
		addModelField(END, "End Date", "结束日");
	}
	
	@Override
	protected void addSearchFields() {
		addSearchField(convertPropertyToField(NAME));
	}
	
	@Override
	protected void addListFields() {
		addListField(convertPropertyToField(NAME, BEGIN, END));
	}
	
	@Override
	protected void addDetailFields() {
		addListField(convertPropertyToField(NAME, BEGIN, END));
	}
	
}
